package com.qingke.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qingke.mapper.DailyPerformanceMapper;
import com.qingke.pojo.DailyPerformance;
import com.qingke.service.DailyPerformanceService;
@Service("dailyPerformanceService")
public class DailyPerformanceServiceImpl implements DailyPerformanceService {
	@Resource
	private DailyPerformanceMapper dfDao;

	public int saveDailyPerformance(DailyPerformance record) {
		return dfDao.insertSelective(record);
	}

	public int softDelete(int id) {
		return dfDao.softDelete(id);
	}

	public DailyPerformance getDailyPerformanceById(int id) {
		return dfDao.selectByPrimaryKey(id);
	}

	public List<DailyPerformance> listDailyPerformanceByStudentId(int studentId) {
		return dfDao.listDailyPerformanceByStudentId(studentId);
	}

	public int updateDailyPerformance(DailyPerformance record) {
		return dfDao.updateByPrimaryKeySelective(record);
	}

}
